package com.caipos.actor.ruleChain;

import com.caipos.actor.common.msg.KbActorStopReason;
import com.caipos.actor.common.msg.KbMsg;
import com.caipos.actor.common.msg.KbRuleEngineActorMsg;
import com.caipos.actor.api.KbContext;
import lombok.EqualsAndHashCode;
import lombok.Getter;

@EqualsAndHashCode(callSuper = true)
public abstract class KbToRuleNodeActorMsg extends KbRuleEngineActorMsg {

    @Getter
    private final KbContext ctx;

    public KbToRuleNodeActorMsg(KbContext ctx, KbMsg kbMsg) {
        super(kbMsg);
        this.ctx = ctx;
    }

    @Override
    public void onKbActorStopped(KbActorStopReason reason) {
        String message = reason == KbActorStopReason.STOPPED ? "Rule node stopped" : "Failed to initialize rule node!";
    }
}
